<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加角色</title>
	<%@ include file="/app/includes/header.jsp"%>
	<script type="text/javascript">
		function addDict(){
			$('#dictForm').submit();
		}
	</script>
</head>
<body>
	<div id="panel" class="easyui-panel" title="添加数据字典信息"
		icon="icon-save" collapsible="true" style="padding: 10px;">
		<form id="dictForm" action="<%=request.getContextPath()%>/system/dict/addDict.action" method="post">
			<table class="table_form">
			<tr>
				<td>
					标识:
				</td>
				<td>
					<input id="id" name="id"  type="text"></input>
				</td>
				<td >
					<div id="idTip"></div>
				</td>
			</tr>
			<tr>
				<td>
					值:
				</td>
				<td>
					<input id="value" name="value" type="text"></input>
				</td>
				<td>
					<div id="valueTip"></div>
				</td>
			</tr>
			<tr>
				<td>
					拼音:
				</td>
				<td>
					<input id="pinyin" name="pinyin" type="text"></input>
				</td>
				<td>
					<div id="pinyinTip" ></div>
				</td>
			</tr>
			<tr>
				<td>
					类型:
				</td>
				<td>
					<input id="type" name="type" type="text"></input>
				</td>
				<td>
					<div id="typeTip" ></div>
				</td>
			</tr>
			<tr>
				<td colspan="3">
					<div style="padding: 10px;" >
						<a href="#" onclick="addDict()" class="easyui-linkbutton" 
							iconCls="icon-add">添加</a>
						<a href="javascript:history.back(-1)" class="easyui-linkbutton"  
							iconCls="icon-cancel">取消</a>
					</div>
				</td>
			</tr>
			</table>
		</form>
	</div>
</body>
	<script type="text/javascript">
		$(document).ready(function(){
		$.formValidator.initConfig({formid:"roleForm"});
		$("#id").formValidator({
			onshow:"请输入标识",
			onfocus:"标识为正整数，例如：11",
			oncorrect:"正确"})
			.regexValidator({regexp:"intege1",datatype:"enum",onerror:"请输入正整数"})
		$("#value").formValidator({
			onshow:"请输入值",
			onfocus:"请正确填写值，例如：1",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"值不能为空！"});
		$("#pinyin").formValidator({
			onshow:"请输入拼音",
			onfocus:"请正确填写拼音，例如：pinyin",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"拼音不能为空！"});
		$("#type").formValidator({
			onshow:"请输入类型",
			onfocus:"请正确填写类型，例如：用户类型",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"类型不能为空！"});
		});
	</script>
</html>






